<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <!--为了兼容ie浏览器,让他尽量用高版本的浏览器-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--视口,是一个虚拟的窗口,使用手机,让网页在手机上能滚动-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap的模态框</title>

    <!-- Bootstrap -->
    <link href="../css/bootstrap.min.css" rel="stylesheet">

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="../js/jquery-3.2.1.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="../js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
    <!-- Button trigger modal -->
    <button type="button" class="btn btn-danger btn-lg" data-toggle="modal" data-target="#myModal">
        点击添加联系人
    </button>

    <!-- 模态框 -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <!--头部-->
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">添加联系人</h4>
                </div>
                <!--中间主体内容-->
                <div class="modal-body">
                    <form action="#">
                        <div class="form-group">
                            <label>姓名:</label><input class="form-control">
                        </div>

                        <div class="form-group">
                            <label>性别:</label><input type="radio" name="sex"><label>&nbsp;&nbsp;男</label>&nbsp;&nbsp;&nbsp; <input type="radio" name="sex"><label>&nbsp;&nbsp;女</label>
                        </div>

                        <div class="form-group">
                            <label>生日:</label>
                            <input type="date" class="form-control">
                        </div>

                        <div class="form-group">
                            <label>学历:</label>
                            <select class="form-control">
                                <option>小学</option>
                                <option>高中</option>
                                <option>本科</option>
                                <option>社会大学</option>
                            </select>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary">保存</button>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>